<?php

namespace app\admin\model;
use think\Model;
use think\Db;
use think\Paginator;

class Recharge extends Model
{
    public function getCreateTimeTurnAttr($value, $data)
    {
        return date('Y-m-d H:i:s',$data['create_time']);
    }

    public function selectInfo()
    {
        $field = ['r.create_time,money,telphone,nickname,r.user_id,headimgurl,r.type,r.status,r.id'];
        $data = Db::name('recharge')
                ->alias('r')
                ->field($field)
                ->join('gx_cuser c','c.id = r.user_id')
                ->join('gx_cuser_info i','i.uid = c.id')
                ->paginate('',false,page_param());

        return $data;
    }
}